<?php

declare(strict_types=1);

namespace App\Entity;

use App\Models\CitySettings as CitySettingsM;

class CitySettingsEntity extends ABaseEntity
{
    /**
     * CitySettingsEntity constructor.
     */
    public function __construct(CitySettingsM $model)
    {
        $this->model = $model;
    }

    /**
     * @return CitySettingsEntity
     */
    public static function find(int $id)
    {
        $systemSettings = CitySettingsM::find($id);
        if ($systemSettings === null) {
            return null;
        }

        return new self($systemSettings);
    }

    public function getId()
    {
        return $this->model->id;
    }
}
